
<div class="row">
	<div class="col-lg-4">
		<div id="accordion" class="panel-group m-bot20">
			<div class="panel panel-default">
				<div class="panel-heading">
					<h4 class="panel-title">
						<a href="#collapseOne" data-parent="#accordion" data-toggle="collapse" class="accordion-toggle">
							Khu Vực / Tầng
						</a>
					</h4>
				</div>
				<div class="panel-collapse collapse in" id="collapseOne">
					<div class="panel-body">
						<div id="lstKhuvuc">
							<img id="loadingKhuvuc" src="<?php echo _BASE_URL?>public/default/img/loading.gif" />
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	
	<div class="col-lg-8">
		<div id="accordion" class="panel-group m-bot20">
			<div class="panel panel-default">
				<div class="panel-heading">
					<h4 class="panel-title">
						<a href="#collapseOne" data-parent="#accordion" data-toggle="collapse" class="accordion-toggle">
							Danh sách bàn / Phòng
						</a>
					</h4>
				</div>
				<div class="panel-collapse collapse in" id="collapseOne">
					<div class="panel-body">
						<div id="lstDsBan"></div>
					</div>
				</div>
			</div>
		</div>
	</div>
	
	<div class="tags_clear"></div>
	
	
	
	<div class="col-lg-4">
		<div id="accordion" class="panel-group m-bot20">
			<div class="panel panel-default">
				<div class="panel-heading">
					<h4 class="panel-title">
						<a href="#collapseOne" data-parent="#accordion" data-toggle="collapse" class="accordion-toggle">
							Nhóm món
						</a>
					</h4>
				</div>
				<div class="panel-collapse collapse in" id="collapseOne">
					<div class="panel-body">
						<div id="lstNhommon">
							<button type="button" class="btn btn-shadow btn-success" onclick="loadDsthucdon()">Thực đơn</button>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	
	<div class="col-lg-8">
		<div id="accordion" class="panel-group m-bot20">
			<div class="panel panel-default">
				<div class="panel-heading">
					<h4 class="panel-title">
						<a href="#collapseOne" data-parent="#accordion" data-toggle="collapse" class="accordion-toggle">
							Danh mục món
						</a>
					</h4>
				</div>
				<div class="panel-collapse collapse in" id="collapseOne">
					<div class="panel-body">
						<div id="lstDsmon"></div>
					</div>
				</div>
			</div>
		</div>
	</div>
	
	
	
	<div class="tags_clear"></div>
	
	<div class="col-lg-6">
		<div id="accordion" class="panel-group m-bot20">
			<div class="panel panel-default">
				<div class="panel-collapse collapse in" id="collapseOne">
					<div class="panel-body">
						<table>
							<tr>
								<td nowrap="nowrap"> Bàn số </td>
								<td>
									<div class="col-lg-16"> 
										<input type="text" class="form-control" placeholder="Chưa chọn bàn" id="idTenban" disabled="disabled" />
										<input type="text" name="soban" id="idBan" placeholder="-1" style="display: none" />
									</div> 
								</td>
								<td nowrap="nowrap"> Giảm giá (%)</td>
								<td>
									<div class="col-lg-16"> 
										<input type="text" id="txtgiamgia" class="form-control number" placeholder="0" width="10px"/>
									</div> 
								</td>
							</tr>
							<tr>
								<td nowrap="nowrap"> Thành tiền </td>
								<td>
									<div class="col-lg-13"> 
										<input type="text" id="txtThanhtien" class="form-control" placeholder="0" value="0" disabled="disabled" />
									</div> 
								</td>
								<td nowrap="nowrap"> Thanh toán </td>
								<td>
									<div class="col-lg-13"> 
										<input type="text" id="txtThanhtoan" class="form-control" placeholder="0" value="0" disabled="disabled" />
									</div> 
								</td>
								
							</tr>
							<tr>
								<td nowrap="nowrap"> Khách đưa</td>
								<td>
									<div class="col-lg-16"> 
										<input type="text" id="tienkhachdua" class="form-control number" placeholder="0" width="10px"/>
									</div> 
								</td>
								<td nowrap="nowrap"> Trả lại khách </td>
								<td>
									<div class="col-lg-13"> 
										<input type="text" id="tientralai" class="form-control number" placeholder="0" width="10px" disabled="disabled"/>
									</div> 
								</td>
							</tr>
							
						</table>
						
					</div>
				</div>
			</div>
		</div>
	</div>
	
	<div class="col-lg-6">
		<div id="accordion" class="panel-group m-bot20">
			<div class="panel panel-default">
				<div class="panel-collapse collapse in" id="collapseOne">
					<div class="panel-body">
						<table>
							<tr>
								<td>Ghi chú:</td>
								<td><input type="text" id="txtGhichu" class="form-control" placeholder="Ghi chú cho hóa don" style="width: 400px"/></td>
							</tr>
						</table>
						<br />
						<button type="button" class="btn btn-primary" id="btnthanhtoan">Thanh toán</button>
						<a class="btn btn-success" data-toggle="modal" href="#frmthanhtoan" id="btnthanhtoan">Tìm hóa đơn</a>
						<button class="btn btn-primary" type="button" id="btnHuy">Hủy</button>
						
						<button id="btnchuyenban" type="button" class="btn btn-primary" data-toggle="modal" href="#frmchuyenban" disabled="disabled">Chuyển bàn</button>										
						<button type="button" class="btn btn-primary" id="btnhoanthanhoder">Hoàn Thành Oder</button>						
					</div>
				</div>
			</div>
		</div>
	</div>
	
	<div class="tags_clear"></div>
	
	<div class="col-lg-12">
		<div id="accordion" class="panel-group m-bot20">
			<div class="panel panel-default">
				<div class="panel-collapse collapse in" id="collapseOne">
					<div class="panel-body">
						<table class="table" id="tbOrder">
							<thead>
							<tr>
								<th>Tên hàng</th>
								<th width="150px">Số lượng</th>
								<th width="200px">Giá</th>
								<th width="250px">Thành tiền</th>
								<th width="100px">Chọn</th>
								<th width="200px">Chức năng</th>								
							</tr>
							</thead>
							<tbody>
							</tbody>
						</table>                             
					</div>
				</div>
			</div>			
		</div>
	</div>
	
</div>


<!-- Modal -->
<div class="modal fade" id="frmthanhtoan" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
				<h4 class="modal-title">Danh sách hóa đơn</h4>
			</div>
			<div class="modal-body">
				
				<form action="#" class="form-horizontal tasi-form">
					<div class="form-group">
						<label class="control-label col-md-2">Ngày lập hóa đơn</label>
						<div class="col-md-4 col-xs-10">
							<input class="form-control form-control-inline input-medium default-date-picker"  size="16" type="text" value=""  id="dteNgaylaphoadon" />
						</div>
						<div class="col-md-2 col-xs-10" style="margin-top: -10px">
							<button type="button" class="btn btn-primary" id="btnlaydshoadon">Lấy danh sách</button>
						</div>
					</div>
					<div class="tags_clear"></div>
				</form>
				
				<table class="table" id="tblstHoadon">
					<thead>
					<tr>
						<th width="150px"> Số hóa đơn </th>
						<th width="220px">Tên bàn</th>
						<th width="200px">Tổng tiền</th>
						<th width="300px">Ghi Chú</th>
						<th width="150px"></th>
					</tr>
					</thead>
					<tbody>
					</tbody>
				</table>
				
			</div>
			<div class="modal-footer">
				<button data-dismiss="modal" class="btn btn-default" type="button">Đóng</button>
			</div>
		</div>
	</div>
</div>

<!-- Modal -->
<div class="modal fade" id="frmchitiet" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">	
	<input type="hidden" name="idHanghoadv" id="idMon" />	
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
				<h4 class="modal-title">Chi Tiết Món</h4>
			</div>
			<div class="modal-body">
				<td nowrap="nowrap"> Tên Món </td>
								<td>
									<div class="col-lg-13"> 
										<input type="text" id="txttenmon" class="form-control" placeholder="Tên món...."  disabled="disabled" />
									</div> 
								</td>
				<td nowrap="nowrap"> Chi Tiết </td>
								<td>
									<div class="col-lg-13"> 
										<input type="text" id="txtchitietmon" class="form-control" placeholder="Chi tiết món...."  disabled="disabled" />
									</div> 
								</td>
			</div>
			<div class="modal-footer">
				<button class="btn btn-success" type="button" id="btnchonmon">Chọn Món</button>
				<button data-dismiss="modal" class="btn btn-default" type="button">Đóng</button>
			</div>
		</div>
	</div>
</div>

<!-- Add Modal -->

<!-- Add Modal -->
<div class="modal fade" id="frmchuyenban" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
 	<div class="modal-dialog">
 		<div class="modal-content">
 		<div class="modal-header">
 			<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
 			<h4 class="modal-title">Chuyển Bàn</h4>
		</div>
 			<div class="modal-body">
			<form id="frmadddmban" class="form-horizontal tasi-form" method="get">
				<input type="hidden" name="idDmban" id="idDmban" value="idBan"  />
				
					
					<div class="form-group">
						<label class="col-sm-2 col-sm-2 control-label">Chuyển bàn từ: </label>
						<div class="col-sm-10">
							<input type="text" class="form-control" placeholder="so ban" readonly="readonly" id="txtchuyenbantu" />
						</div>
					</div>
				
					<div class="form-group" id="grpdmban">
						<label class="col-sm-2 control-label">Đến bàn</label>
						<div class="col-sm-10">
							<select class="form-control m-bot15" name = "dmBan" id ="dmBan">
								<option value = "-1"> Chọn bàn.. </option>
								 <?php foreach ($this->rsKhuvuc as $getkhuvuc){?>
								 <optgroup label = "<?php echo $getkhuvuc['Ten']?>">
								 	<?php foreach ($this->rsDmban as $getdmban){?> 
								 		<?php if($getdmban['IdKhuVuc'] == $getkhuvuc['Id']){?>
								 			<option value = "<?php echo $getdmban['Id']?>"> <?php echo $getdmban['Ten']?></option>
	    								   <?php  }?>	
	    								 <?php  }?>	
	    							 <?php  }?>
	  							</optgroup>
	  						</select> 
						</div>
					</div>
				
			</form>
		  	</div>
		  	<div class="modal-footer">
			  	<button data-dismiss="modal" class="btn btn-default" type="button">Đóng</button>
			  	<button class="btn btn-success" type="button" id="chuyen">Chuyển</button>		
		  	</div>
	  	</div>
  	</div>
</div>
<!-- modal -->

<style>
.modal-dialog{
	  width: 80%;
}

.dropdown-menu{
	z-index: 1065;
}
</style>


<script> var _baseURL = "<?php echo _BASE_URL?>"; </script>
<script type="text/javascript" src="<?php echo _BASE_URL ?>public/default/common.js"></script>
<script type="text/javascript" src="<?php echo _BASE_URL ?>public/default/luutam.js"></script>
<script type="text/javascript" src="<?php echo _BASE_URL ?>public/default/mainscript.js"></script>
<script type="text/javascript" src="<?php echo _BASE_URL ?>public/default/hoadon.js"></script>


<script>
if (top.location != location) {
    top.location.href = document.location.href ;
}

$(function(){
	window.prettyPrint && prettyPrint();
    $('.default-date-picker').datepicker ({
        format: 'dd-mm-yyyy'
    });
});
</script>